﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects
{
    public class RestaurantMenu : BusinessObject
    {
        public RestaurantMenu()
        {
            AddRule(new ValidateRequired("MenuCode"));
            AddRule(new ValidateLength("MenuCode", 0, 20));

            AddRule(new ValidateRequired("MenuName"));
            AddRule(new ValidateLength("MenuCode", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
            AddRule(new ValidateRequired("UnitID"));
            AddRule(new ValidateRequired("MenuCategoryID"));
        }

        public RestaurantMenu(string menuId, string menuCode, string menuName, string description, string unitId,
                                decimal salesPrice, byte[] menuImage, bool isActive, bool isNorm, string restaurantId, string menuCategoryId)
            : this()
        {
            MenuID = menuId;
            MenuCode = menuCode;
            MenuName = menuName;
            Description = description;
            UnitID = unitId;
            SalesPrice = salesPrice;
            MenuImage = menuImage;
            IsActive = isActive;
            IsNorm = isNorm;
            RestaurantID = restaurantId;
            MenuCategoryID = menuCategoryId;
        }

        public string MenuID { get; set; }

        public string MenuCode { get; set; }

        public string MenuName { get; set; }

        public string Description { get; set; }

        public string UnitID { get; set; }

        public decimal SalesPrice { get; set; }

        public byte[] MenuImage { get; set; }

        public bool IsActive { get; set; }

        public bool IsNorm { get; set; }

        public string RestaurantID { get; set; }

        public string MenuCategoryID { get; set; }
    }
}
